<?php require_once('../../../Connections/shopcarda1.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {

if($_POST['c_pass']=="auto"){
	$_POST['c_pass'] = substr($_POST['credit_no'], 5, 5);
	}
if($_POST['c_pass']=="type_pass"){
	$_POST['c_pass'] = $_POST['c_type_pass'];
	}

if($_POST['s_pass']=="auto"){
	$_POST['s_pass'] = substr($_POST['credit_no'], 5, 5);
	}
if($_POST['s_pass']=="type_pass"){
	$_POST['s_pass'] = $_POST['s_type_pass'];
	}

  $updateSQL = sprintf("UPDATE company_member SET company=%s, credit_no=%s, addr=%s, tel=%s, fax=%s, cooperation=%s, cooperation2=%s, c_pass=%s, s_pass=%s, order_addr=%s, p_name=%s, p_addr=%s, p_tel=%s, p_extension=%s, p_phone=%s, p_mail=%s, c_name=%s, c_addr=%s, c_tel=%s, c_extension=%s, c_phone=%s, c_mail=%s, c_status=%s WHERE cm_id=%s",
                       GetSQLValueString($_POST['company'], "text"),
                       GetSQLValueString($_POST['credit_no'], "text"),
                       GetSQLValueString($_POST['addr'], "text"),
                       GetSQLValueString($_POST['tel'], "text"),
                       GetSQLValueString($_POST['fax'], "text"),
                       GetSQLValueString(isset($_POST['cooperation']) ? "true" : "", "defined","1","0"),
                       GetSQLValueString(isset($_POST['cooperation2']) ? "true" : "", "defined","1","0"),
                       GetSQLValueString($_POST['c_pass'], "text"),
                       GetSQLValueString($_POST['s_pass'], "text"),
                       GetSQLValueString($_POST['order_addr'], "text"),
                       GetSQLValueString($_POST['p_name'], "text"),
                       GetSQLValueString($_POST['p_addr'], "text"),
                       GetSQLValueString($_POST['p_tel'], "text"),
                       GetSQLValueString($_POST['p_extension'], "text"),
                       GetSQLValueString($_POST['p_phone'], "text"),
                       GetSQLValueString($_POST['p_mail'], "text"),
                       GetSQLValueString($_POST['c_name'], "text"),
                       GetSQLValueString($_POST['c_addr'], "text"),
                       GetSQLValueString($_POST['c_tel'], "text"),
                       GetSQLValueString($_POST['c_extension'], "text"),
                       GetSQLValueString($_POST['c_phone'], "text"),
                       GetSQLValueString($_POST['c_mail'], "text"),
                       GetSQLValueString($_POST['c_status'], "int"),
                       GetSQLValueString($_POST['cm_id'], "int"));

  mysql_select_db($database_shopcarda1, $shopcarda1);
  $Result1 = mysql_query($updateSQL, $shopcarda1) or die(mysql_error());

  $updateGoTo = "admin_companym_list.php";
  if (isset($_SERVER['QUERY_STRING'])) {
    $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
    $updateGoTo .= $_SERVER['QUERY_STRING'];
  }
  header(sprintf("Location: %s", $updateGoTo));
}

$colname_company_member_r = "-1";
if (isset($_GET['cm_id'])) {
  $colname_company_member_r = $_GET['cm_id'];
}
mysql_select_db($database_shopcarda1, $shopcarda1);
$query_company_member_r = sprintf("SELECT * FROM company_member WHERE cm_id = %s", GetSQLValueString($colname_company_member_r, "int"));
$company_member_r = mysql_query($query_company_member_r, $shopcarda1) or die(mysql_error());
$row_company_member_r = mysql_fetch_assoc($company_member_r);
$totalRows_company_member_r = mysql_num_rows($company_member_r);

mysql_select_db($database_shopcarda1, $shopcarda1);
$query_order_addr_r = "SELECT * FROM order_addr ORDER BY oa_id ASC";
$order_addr_r = mysql_query($query_order_addr_r, $shopcarda1) or die(mysql_error());
$row_order_addr_r = mysql_fetch_assoc($order_addr_r);
$totalRows_order_addr_r = mysql_num_rows($order_addr_r);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/admin_page.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>無標題文件</title>
<!-- InstanceEndEditable -->
<style type="text/css">
<!--
#cantainer {
	width: 955px;
	margin-right: 33px;
	margin-left: 33px;
}
#header {
	width: 955px;
	margin-bottom: 10px;
	background-image: url(../../../images/top_bg.png);
	height: 82px;
}
#body {
	width: 955px;
	margin-bottom: 10px;
}
#footer {
	width: 955px;
}
.style2 {color: #666666;
	font-size: 12px;
}
#contant_list {
	float: left;
	width: 180px;
	margin-right: 10px;
}
.style17 {color: #74B9E5; font-size: 14px; }
.style43 {font-size: 12px; color: #666666; font-weight: bold; }
#contant_body {
	float: right;
	width: 765px;
}
-->
</style>
<!-- InstanceBeginEditable name="head" -->
<style type="text/css">
<!--
#contant_body_up {
	background-image: url(../../images/admin_companym_headerc.png);
	height: 62px;
	width: 765px;
	margin-bottom: 10px;
}
#contant_body_1 {
	width: 765px;
}
#contant_body_1_1 {
	width: 737px;
	margin-right: 10px;
	margin-bottom: 10px;
	margin-left: 10px;
	background-image: url(../../images/admin_companym_infor.png);
	height: 25px;
}
#contant_body_1_2 {
	width: 737px;
	margin-right: 10px;
	margin-bottom: 10px;
	margin-left: 10px;
}
.style16 {font-size: 14px}
#contant_body_1_3 {
	background-image: url(../../images/admin_companym_contactm.png);
	height: 25px;
	width: 737px;
	margin-right: 10px;
	margin-bottom: 10px;
	margin-left: 10px;
}
#contant_body_1_4 {
	width: 737px;
	margin-right: 10px;
	margin-bottom: 10px;
	margin-left: 10px;
}
#contant_body_1_5 {
	background-image: url(../../images/admin_companym_contacts.png);
	height: 25px;
	width: 737px;
	margin-right: 10px;
	margin-bottom: 10px;
	margin-left: 10px;
}
#contant_body_1_6 {
	width: 737px;
	margin-right: 10px;
	margin-bottom: 10px;
	margin-left: 10px;
}
#contant_body_1_footer {
	width: 737px;
	margin-right: 10px;
	margin-bottom: 10px;
	margin-left: 10px;
}
#contant_body_1_7 {
	background-image: url(../../images/admin_companym_changes.png);
	width: 737px;
	margin-right: 10px;
	margin-bottom: 10px;
	margin-left: 10px;
	height: 25px;
}
#contant_body_1_8 {
	width: 737px;
	margin-right: 10px;
	margin-bottom: 10px;
	margin-left: 10px;
}
-->
</style>
<script language="javascript">
window.onload=function(){
	cpassset();
	spassset();
	}
</script>
<!-- InstanceEndEditable -->
</head>

<body>
<table width="1024" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><div id="cantainer">
      <div id="header"></div>
      <div id="body">
        <div id="contant_list">
          <table border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td align="center"><img src="../../../images/index_12.png" width="180" height="54" /></td>
            </tr>
            <tr>
              <td><table width="180" border="0" align="center" cellpadding="0" cellspacing="0" background="../../../images/index_12_20.png">
                  <tr>
                    <td width="10"></td>
                    <td><table border="0" align="center" cellpadding="0" cellspacing="0">
                        <tr>
                          <td align="center"><span class="style17">＞</span></td>
                          <td align="left" class="style43">商品管理</td>
                        </tr>
                        <tr>
                          <td width="30" align="center">&nbsp;</td>
                          <td width="127" align="left" class="style2"><a href="../../product/admin_product_add.html">新增商品</a><br />
                            <a href="../../product/admin_product_change_list.html">產品資訊管理</a><br /></td>
                        </tr>
                        <tr>
                          <td colspan="2"><img src="../../../images/dotsline.png" width="167" height="11" /></td>
                        </tr>
                        <tr>
                          <td align="center"><span class="style17">＞</span></td>
                          <td align="left"><strong class="style43">會員管理</strong></td>
                        </tr>
                        <tr>
                          <td align="center">&nbsp;</td>
                          <td align="left" class="style2"><a href="admin_companym_add.html">新增公司會員</a><br />
                            <a href="admin_companym_list.html">公司會員管理</a><br />
                            <a href="../personal_member/admin_pearsonal_list.html">個人會員管理</a></td>
                        </tr>
                        <tr>
                          <td colspan="2"><img src="../../../images/dotsline.png" alt="" width="167" height="11" /></td>
                        </tr>
                        <tr>
                          <td align="center"><span class="style17">＞</span></td>
                          <td align="left" class="style43">供應商管理</td>
                        </tr>
                        <tr>
                          <td align="center">&nbsp;</td>
                          <td align="left" class="style2"><a href="../../supplier/admin_supplier_brand.html">品牌管理</a></td>
                        </tr>
                        <tr>
                          <td colspan="2"><img src="../../../images/dotsline.png" alt="" width="167" height="11" /></td>
                        </tr>
                        <tr>
                          <td align="center"><span class="style17">＞</span></td>
                          <td align="left" class="style43">進銷存管理</td>
                        </tr>
                        <tr>
                          <td align="center">&nbsp;</td>
                          <td align="left" class="style2">進貨管理<br />
                            訂單管理</td>
                        </tr>
                        <tr>
                          <td colspan="2" align="center"><img src="../../../images/dotsline.png" alt="" width="167" height="11" /></td>
                          </tr>
                        <tr>
                          <td align="center"><span class="style17">＞</span></td>
                          <td align="left" class="style43">紅利管理</td>
                        </tr>
                        <tr>
                          <td align="center">&nbsp;</td>
                          <td align="left" class="style2">紅利設定<br />
                            公司會員紅利管理<br />
                            個人會員紅利管理</td>
                        </tr>
                        <tr>
                          <td colspan="2" align="center"><img src="../../../images/dotsline.png" alt="" width="167" height="11" /></td>
                        </tr>
                        <tr>
                          <td align="center"><span class="style17">＞</span></td>
                          <td align="left" class="style43">資訊管理</td>
                        </tr>
                        <tr>
                          <td align="center">&nbsp;</td>
                          <td align="left" class="style2">公告資訊管理<br />
                            公司資訊管理<br />
                            客服資訊管理<br />
                            Banner管理</td>
                        </tr>
                        <tr>
                          <td colspan="2"><img src="../../../images/dotsline.png" alt="" width="167" height="11" /></td>
                        </tr>
                        <tr>
                          <td align="center"><span class="style17">＞</span></td>
                          <td class="style43">權限管理</td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                          <td class="style2">新增使用者<br />
                            使用者設定<br />
                            群組設定<br />
                            使用者權限設定</td>
                        </tr>
                        <tr>
                          <td colspan="2"><img src="../../../images/dotsline.png" alt="" width="167" height="11" /></td>
                        </tr>
                    </table></td>
                    <td width="10"></td>
                  </tr>
              </table></td>
            </tr>
            <tr>
              <td width="180" height="28" align="center"><table width="0" border="0" align="center" cellpadding="0" cellspacing="0">
                  <tr>
                    <td width="180" height="28" align="center"><img src="../../../images/index_20.png" width="180" height="28" /></td>
                  </tr>
              </table></td>
            </tr>
          </table>
        </div>
        <!-- InstanceBeginEditable name="EditRegion1" -->
        <div id="contant_body">
          <div id="contant_body_up"></div>
          <div id="contant_body_1">
          <form id="form1" name="form1" method="POST" action="<?php echo $editFormAction; ?>">
            <table cellpadding="0" cellspacing="0">
              <tr>
                <td colspan="3"><img src="../../../member/img/member_body_up.jpg" width="765" height="9" /></td>
              </tr>
              <tr>
                <td width="4" background="../../../member/img/member_body_left.jpg">&nbsp;</td>
                <td width="757"><div id="contant_body_1_1"></div>
                  <div id="contant_body_1_2">
                    <table width="737" cellspacing="0" cellpadding="5">
                      <tr>
                        <td width="100" class="style16"><div align="center">公司
                          <input name="cm_id" type="hidden" id="cm_id" value="<?php echo $row_company_member_r['cm_id']; ?>" />
                        </div></td>
                        <td width="635" class="style16"><div align="left"><?php echo $row_company_member_r['company']; ?>
                          <input name="company" type="hidden" id="company" value="<?php echo $row_company_member_r['company']; ?>" />
                        </div></td>
                      </tr>
                      <tr>
                        <td bgcolor="#D5EBEF"><div align="center" class="style16">統一編號</div></td>
                        <td bgcolor="#D5EBEF" class="style16"><div align="left"><?php echo $row_company_member_r['credit_no']; ?>
                          <input name="credit_no" type="hidden" id="credit_no" value="<?php echo $row_company_member_r['credit_no']; ?>" />
                        </div></td>
                      </tr>
                      <tr>
                        <td><div align="center" class="style16">公司地址</div></td>
                        <td class="style16"><div align="left">
                            <label>
                              <input name="addr" type="text" id="addr" value="<?php echo $row_company_member_r['addr']; ?>" size="50" />
                              </label>
                        </div></td>
                      </tr>
                      <tr>
                        <td bgcolor="#D5EBEF" class="style16"><div align="center">連絡電話</div></td>
                        <td bgcolor="#D5EBEF" class="style16"><div align="left">
                            <label>
                              <input name="tel" type="text" id="tel" value="<?php echo $row_company_member_r['tel']; ?>" size="15" />
                              </label>
                        </div></td>
                      </tr>
                      <tr>
                        <td class="style16"><div align="center">傳真號碼</div></td>
                        <td class="style16"><div align="left">
                           <label>
                              <input name="fax" type="text" id="fax" value="<?php echo $row_company_member_r['fax']; ?>" size="15" />
                              </label>
                        </div></td>
                      </tr>
                      <tr>
                        <td bgcolor="#D5EBEF" class="style16"><div align="center">合作方式</div></td>
                        <td bgcolor="#D5EBEF" class="style16"><label>
                            <input <?php if (!(strcmp($row_company_member_r['cooperation'],1))) {echo "checked=\"checked\"";} ?> type="checkbox" name="cooperation" id="cooperation" />
                            </label>
                          公司會員
                          <label>
                            <input <?php if (!(strcmp($row_company_member_r['cooperation2'],1))) {echo "checked=\"checked\"";} ?> type="checkbox" name="cooperation2" id="cooperation2" />
                            </label>
                          供應商</td>
                      </tr>
                      <tr>
                        <td class="style16"><div align="center">公司會員專區<br />
                          密碼設定</div></td>
                        <td class="style16">
                        <p>
                              <label>
                                <input <?php if (!(strcmp($row_company_member_r['c_pass'],"auto"))) {echo "checked=\"checked\"";} ?> name="c_pass" type="radio" id="c_pass_0" value="auto" onclick="cpass()" checked="checked" />
                                預設密碼(統一編號後五碼)</label>
                              <br />
                              <label>
                                <input <?php if (!(strcmp($row_company_member_r['c_pass'],"type_pass"))) {echo "checked=\"checked\"";} ?> type="radio" name="c_pass" value="type_pass" id="c_pass_1" onclick="cpass()" />
                                設定密碼</label>
                              <label for="c_type_pass"></label>
                              <div style="display:none" id="type_cpass"><input type="password" name="c_type_pass" id="c_type_pass" /></div>
                              
                            </p>
<script language="javascript">
          function cpass(){
			var radios=document.getElementsByName("c_pass");
			type_cpass.style.display="";
								//alert(radios[1].value);
			if(document.getElementsByName("c_pass")[0].checked == true){
									//alert("選一");
			type_cpass.style.display="none";
									}
								}
		  
		  function cpassset(){
			  var cpass_set = "<?php echo substr($row_company_member_r['credit_no'], 5, 5); ?>";
			  if (cpass_set==<?php echo $row_company_member_r['c_pass']; ?>){
				  document.getElementsByName("c_pass")[0].checked = true;
				  cpass();
				  }else{
					  document.getElementById('c_type_pass').value="<?php echo $row_company_member_r['c_pass']; ?>";
					  document.getElementsByName("c_pass")[1].checked = true;
					  cpass();
					  }
			  }
                            </script></td>
                      </tr>
                      <tr>
                        <td bgcolor="#D5EBEF" class="style16"><div align="center">供應商專區<br />
                          密碼設定</div></td>
                        <td bgcolor="#D5EBEF" class="style16">                           <p>
                              <label>
                                <input <?php if (!(strcmp($row_company_member_r['s_pass'],"auto"))) {echo "checked=\"checked\"";} ?> name="s_pass" type="radio" id="s_pass_0" value="auto" onclick="spass()" checked="checked" />
                                預設密碼(統一編號後五碼)</label>
                              <br />
                              <label>
                                <input <?php if (!(strcmp($row_company_member_r['s_pass'],"type_pass"))) {echo "checked=\"checked\"";} ?> type="radio" name="s_pass" value="type_pass" id="s_pass_1" onclick="spass()" />
                                設定密碼</label>
                                <div style="display:none" id="type_spass"><input type="password" name="s_type_pass" id="s_type_pass" /></div><script language="javascript">
                            function spass(){
								var radios=document.getElementsByName("s_pass");
								type_spass.style.display="";
								//alert(radios[1].value);
								if(document.getElementsByName("s_pass")[0].checked == true){
									//alert("選一");
									type_spass.style.display="none";
									}
								}
		  function spassset(){
			  var spass_set = "<?php echo substr($row_company_member_r['credit_no'], 5, 5); ?>";
			  if (spass_set==<?php echo $row_company_member_r['s_pass']; ?>){
				  document.getElementsByName("s_pass")[0].checked = true;
				  spass();
				  }else{
					  document.getElementById('s_type_pass').value="<?php echo $row_company_member_r['s_pass']; ?>";
					  document.getElementsByName("s_pass")[1].checked = true;
					  spass();
					  }
			  }
                            </script>
                            </p></td>
                      </tr>
                      <tr>
                        <td valign="top" class="style16"><div align="center">合併訂單地址設定</div></td>
                        <td class="style16">
                            <?php do { ?>
                              <p>
                                <label>
                                  <input <?php if($row_company_member_r['order_addr']==$row_order_addr_r['oa_id']){echo "checked=\"checked\"";} ?> type="radio" name="order_addr" value="<?php echo $row_order_addr_r['oa_id']; ?>" id="order_addr_<?php echo $row_order_addr_r['oa_id']; ?>" />
                                  <?php echo $row_order_addr_r['order_addr']; ?></label>
                                <br />
                              </p>
                              <?php } while ($row_order_addr_r = mysql_fetch_assoc($order_addr_r)); ?></td>
                      </tr>
                    </table>
                  </div>
                  <div id="contant_body_1_3"></div>
                  <div id="contant_body_1_4">
                    <table width="737" cellspacing="0" cellpadding="5">
                      <tr>
                        <td width="97" class="style16"><div align="center">名字</div></td>
                        <td colspan="3" class="style16"><div align="left">
                              <label>
                              <input name="p_name" type="text" id="p_name" value="<?php echo $row_company_member_r['p_name']; ?>" size="10" />
                              </label>
                        </div></td>
                      </tr>
                      <tr>
                        <td bgcolor="#D5EBEF" class="style16"><div align="center">聯絡地址</div></td>
                        <td colspan="3" bgcolor="#D5EBEF" class="style16"><div align="left">
                            <label>
                              <input name="p_addr" type="text" id="p_addr" value="<?php echo $row_company_member_r['p_addr']; ?>" size="50" />
                              </label>
                        </div></td>
                      </tr>
                      <tr>
                        <td><div align="center" class="style16">連絡電話</div></td>
                        <td width="90" class="style16"><div align="left">
                              <label>
                              <input name="p_tel" type="text" id="p_tel" value="<?php echo $row_company_member_r['p_tel']; ?>" size="15" />
                              </label>
                        </div></td>
                        <td width="50" class="style16"><div align="center">分機</div></td>
                        <td width="458" class="style16"><div align="left">
                            <label>
                              <input name="p_extension" type="text" id="p_extension" value="<?php echo $row_company_member_r['p_extension']; ?>" size="10" />
                              </label>
                        </div></td>
                      </tr>
                      <tr>
                        <td bgcolor="#D5EBEF"><div align="center" class="style16">手機</div></td>
                        <td colspan="3" bgcolor="#D5EBEF" class="style16"><div align="left">
                            <label>
                              <input name="p_phone" type="text" id="p_phone" value="<?php echo $row_company_member_r['p_phone']; ?>" size="15" />
                              </label>
                        </div></td>
                      </tr>
                      <tr>
                        <td class="style16"><div align="center">電子郵件</div></td>
                        <td colspan="3" class="style16"><div align="left">
                            <label>
                              <input name="p_mail" type="text" id="p_mail" value="<?php echo $row_company_member_r['p_mail']; ?>" size="30" />
                              </label>
                        </div></td>
                      </tr>
                    </table>
                  </div>
                  <div id="contant_body_1_5"></div>
                  <div id="contant_body_1_6">
                    <table width="737" cellspacing="0" cellpadding="5">
                      <tr>
                        <td width="97" class="style16"><div align="center">名字</div></td>
                        <td colspan="3" class="style16"><div align="left">
                            <label>
                              <input name="c_name" type="text" id="c_name" value="<?php echo $row_company_member_r['c_name']; ?>" size="10" />
                              </label>
                        </div></td>
                      </tr>
                      <tr>
                        <td bgcolor="#D5EBEF" class="style16"><div align="center">聯絡地址</div></td>
                        <td colspan="3" bgcolor="#D5EBEF" class="style16"><div align="left">
                            <label>
                              <input name="c_addr" type="text" id="c_addr" value="<?php echo $row_company_member_r['c_addr']; ?>" size="50" />
                              </label>
                        </div></td>
                      </tr>
                      <tr>
                        <td><div align="center" class="style16">連絡電話</div></td>
                        <td width="90" class="style16"><div align="left">
                            <label>
                              <input name="c_tel" type="text" id="c_tel" value="<?php echo $row_company_member_r['c_tel']; ?>" size="15" />
                              </label>
                        </div></td>
                        <td width="50" class="style16"><div align="center">分機</div></td>
                        <td width="458" class="style16"><div align="left">
                            <label>
                              <input name="c_extension" type="text" id="c_extension" value="<?php echo $row_company_member_r['c_extension']; ?>" size="10" />
                              </label>
                        </div></td>
                      </tr>
                      <tr>
                        <td bgcolor="#D5EBEF"><div align="center" class="style16">手機</div></td>
                        <td colspan="3" bgcolor="#D5EBEF" class="style16"><div align="left">
                            <label>
                              <input name="c_phone" type="text" id="c_phone" value="<?php echo $row_company_member_r['c_phone']; ?>" size="15" />
                              </label>
                        </div></td>
                      </tr>
                      <tr>
                        <td class="style16"><div align="center">電子郵件</div></td>
                        <td colspan="3" class="style16"><div align="left">
                            <label>
                              <input name="c_mail" type="text" id="c_mail" value="<?php echo $row_company_member_r['c_mail']; ?>" size="30" />
                              </label>
                        </div></td>
                      </tr>
                    </table>
                  </div>
                  <div id="contant_body_1_7"></div>
                  <div id="contant_body_1_8">
                    <table width="737" cellspacing="0" cellpadding="5">
                      <tr>
                        <td width="97" class="style16"><div align="center">狀態調整</div></td>
                        <td width="608" class="style16">
                          <label>
                            <input <?php if (!(strcmp($row_company_member_r['c_status'],"1"))) {echo "checked=\"checked\"";} ?> type="radio" name="c_status" value="1" id="c_status_0" />
                            正常</label>
                          <label>
                            <input <?php if (!(strcmp($row_company_member_r['c_status'],"0"))) {echo "checked=\"checked\"";} ?> type="radio" name="c_status" value="0" id="c_status_1" />
                            停止使用</label>
                          <br />
                        </p></td>
                      </tr>
                    </table>
                  </div>
                  <div id="contant_body_1_footer">
                    <table width="737" cellspacing="0" cellpadding="5">
                      <tr>
                        <td align="center">
                          <label>
                            <input type="submit" name="button" id="button" value="修改" />
                            </label>
                          <label>
                          <input type="submit" name="button3" id="button3" value="回上一頁" />
                          <input type="submit" name="button2" id="button2" value="重寫" />
                          </label>
                        </td>
                      </tr>
                    </table>
                  </div></td>
                <td width="4" background="../../../member/img/member_body_right.jpg">&nbsp;</td>
              </tr>
              <tr>
                <td height="9" colspan="3"><img src="../../../member/img/member_body_down.jpg" width="765" height="9" /></td>
              </tr>
            </table>
            <input type="hidden" name="MM_update" value="form1" />
          </form>
          </div>
        </div>
        <!-- InstanceEndEditable --></div>
      <div id="footer">
        <table width="955" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td width="230" height="118" align="center"><a href="index.html"><img width="200" height="66" alt="logo位置" style="background-color: #FF0000" /></a></td>
            <td width="10" align="center"><img src="../../../images/end_Separateline1.png" width="1" height="80" /></td>
            <td width="715" valign="middle"><table width="715" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td height="40" valign="top" class="style2"><table border="0" cellpadding="0" cellspacing="0">
                      <tr>
                        <td width="50" align="center" class="style2"></td>
                        <td>本平台中台灣各店家所銷售的商品或服務，都是由各該店家所銷售或提供。 | 電話 : 02-2275-3588 | 傳真 : 02-2275-3788<br/>
                          微衡科技　版權所有 ⓒ 2011 Microbalance. All Rights Reserved.</td>
                      </tr>
                  </table></td>
                </tr>
            </table></td>
          </tr>
        </table>
      </div>
      </div></td>
  </tr>
</table>
</body>
<!-- InstanceEnd --></html>
<?php
mysql_free_result($company_member_r);

mysql_free_result($order_addr_r);
?>
